package com.situ.mall.controller;

import com.situ.mall.service.IOrderService;
import com.situ.mall.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/echarts")
public class EChartsController {
    @Autowired
    private IOrderService orderService;

    @RequestMapping("/getEChartsPage")
    public String getEChartsPage() {
        return "echarts";
    }

    @ResponseBody
    @RequestMapping("/selectOrderProductCount")
    public JSONResult selectOrderProductCount() {
        return orderService.selectOrderProductCount();
    }
}
